---------------------------------------------------------------------------------
  -- Design Name : Compare
  -- File Name   : GenCmp32.vhd
  -- Function    : Compare two 32-bit values
  -- Authors     : Mirko Francuski  2006/0225
  --               Milos Mihajlovic 2006/0039
  -- School      : University of Belgrade
  --               School for Electrical Engineering
  --               Department for Computer Engineering and Information Theory
  -- Subject     : VLSI Computer Systems
---------------------------------------------------------------------------------

library ieee;

use ieee.std_logic_1164.all;
use ieee.std_logic_unsigned.all;
use work.UserPkg.all;

entity GenCmp32 is
  port (
      enable:   in  std_logic;
      in1:      in  word32;
      in2:      in  word32;
      G:        out std_logic := '0';
      E:        out std_logic := '0';
      L:        out std_logic := '0'
    );
end GenCmp32;

architecture behavioral of GenCmp32 is
begin
  G <= '1' when (enable = '1' and in1 > in2)
     else '0';
  E <= '1' when (enable = '1' and in1 = in2)
     else '0';
  L <= '1' when (enable = '1' and in1 < in2)
     else '0';
end architecture behavioral;

